﻿@model EditorialProyectos.Website.Models.ProjectViewModel

@{
    ViewBag.Title = "Editorial proyectos!";
    if (@User.IsInRole("Admin"))
    {
        Layout = "~/Views/Shared/_AdminLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_UserLayout.cshtml";
    }
}

@section Scripts{
    @Content.Resource("ckeditor", "ckeditor.js", Url)
    @Content.ViewModel("BenefitViewModel.js", Url)
    @Content.ViewModel("ProjectViewModel.js", Url)
    @Content.ViewModel("TextEditorViewModel.js", Url)

    @Html.KOGridTemplate(model => model.List)

    <script>
        var modelData = '@Html.Raw(Model.ToJson())';
        var modelJSON = JSON.parse(modelData);

        var viewModel = new ProjectViewModel(modelJSON);
        ko.applyBindings(viewModel);
    </script>
}
<div class="jumbotron color-white" data-bind="with: viewModel">
    @Html.Partial("MainPartial", Model)

  @*  <div class="row" data-bind="visible: Main.State.CurrentPage() == 'Info'">
        <div class="col-md-12">
            @Html.Partial("InfoPartial", Model)
        </div>
    </div>

    <div class="row" data-bind="visible: Main.State.CurrentPage() == 'Create'">
        <div class="col-md-12">
            @Html.Partial("CreatePartial", Model)
        </div>
    </div>

    <div class="row" data-bind="visible: Main.State.CurrentPage() == 'Update'">
        <div class="col-md-12">
            @Html.Partial("UpdatePartial", Model)
        </div>
    </div>

    <div class="row" data-bind="visible: Main.State.CurrentPage() == 'Delete'">
        <div class="col-md-12">
            @Html.Partial("DeletePartial", Model)
        </div>
    </div>*@
</div>
